#!/bin/bash

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

pushd $(dirname "$0") > /dev/null

kubectl apply --overwrite=true -f rbac.yaml || exit $?

kubectl apply --overwrite=true -f database-controller.yaml || exit $?

# Wait until the service is ready.
PYTHONPATH="../../../deployment" python -m  k8sPaiLibrary.monitorTool.check_pod_ready_status -w -k app -v database-controller || exit $?

popd > /dev/null
